package cn.edu.scau.cmi.zhangjunming.spring.onlySpring;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;

import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextField;
import javafx.stage.Stage;

public class SpringController implements Initializable {

	private static Stage stage = null;
	private static Scene scene = null;
	

	@FXML private TextField stuField;
	@FXML private TextField teaField;
	@FXML private Button startButton;
	@FXML private Label stuLabel;
	@FXML private Label teaLabel;
	@FXML private TextArea area;
	
	public SpringController() {
		// TODO 自动生成的构造函数存根
	}

	@Override
	public void initialize(URL arg0, ResourceBundle arg1) {
		// TODO 自动生成的方法存根
		
	}
	
	static void createScene() {
		if(scene==null) {
			try {
				URL url = new SpringController().getClass().getResource("Spring.fxml");
				Parent root = FXMLLoader.load(url);
				scene = new Scene(root);
			}catch(IOException e) {
				e.printStackTrace();
			}
		}
	}
	
	public static Scene getScene() {
		return scene;
	}

	public static void setScene(Scene newScene) {
		scene = newScene;
	}
	
	
	

}
